<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * sfWidgetFormInputFileEditable represents an upload HTML input tag with the possibility
 * to remove a previously uploaded file.
 *
 * @package    symfony
 * @subpackage widget
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfWidgetFormInputFileEditable.class.php 30762 2010-08-25 12:33:33Z fabien $
 */
class sfWidgetFormInputFileEditablePerso extends sfWidgetFormInputFileEditable
{
  protected function getFileAsTag($attributes)
  {
  	sfProjectConfiguration::getActive()->loadHelpers(array('Thumb'));
	$params = array(	'width' => 540,
						'height' => 400, 
						'alt' => 'capture');
    if ($this->getOption('is_image'))
    {
      return false !== $this->getOption('file_src') ? showThumb($this->getOption('file_src'), 'captures', $params) : '';
    }
    else
    {
      return $this->getOption('file_src');
    }
  }
}
?>